package com.etone.smartAudit.mapstruct;

import com.etone.smartAudit.domain.Admin;
import com.etone.smartAudit.dto.admin.AdminDTO;
import com.etone.smartAudit.vo.admin.AdminDetailVO;
import com.etone.smartAudit.vo.admin.AdminVO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValueCheckStrategy;

import java.util.List;

/**
 * @author: sovy
 * @date: 2020-06-03 14:44:51
 * @description:
 */
@Mapper(componentModel = "spring", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface AdminMapstruct {

    AdminDetailVO getAdminDetailVO(Admin admin);

    List<AdminVO> getAdminVO(List<Admin> admins);

    void copyToAdmin(@MappingTarget Admin admin, AdminDTO adminDTO);
}